<%@page import="study.top.jsp.PageHandler"%>
<%@page import="study.top.mydb.items.NboardItem"%>
<%@page import="java.util.ArrayList"%>
<%@page import="study.top.mydb.Nboard"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page session="true"%>
<%@ include file="dbcon.jsp" %>
<!DOCTYPE html>
<html lang="ko">
<%@include file="topHead.jsp" %>
<%
db.connect();
Nboard nboard = new Nboard();
ArrayList <NboardItem> list1 = nboard.selectNboardList();


db.disconnect();


if (list1 == null) {
	web.goPage(null, "데이터 조회에 실패하였습니다.");
	return;
}

%>
<body>
<%@include file="topcategory.jsp" %>
<div class="top-tab top-hidden-xs">
	<%@include file="tab.jsp" %>
</div>
<br />




	<div class="container">
	<div class="top-main-header"></div>
			<%
				//<input type="hidden" name="prono" value="<%=docid%" />
			%>
			<div class="wish-header">
				<h2>
					NOTICE BOARD
				</h2>
			</div>
			<div class="Info wishmargin">
				TOP공지사항입니다.
				<br /> <br />
			</div>
			


<table width="80%" cellpadding="0" cellspacing="0" border="0">
  <tr height="5"></tr>
 <tr style="background:url('img/table_mid.gif') repeat-x; text-align:center;">
   <td width="5"><img src="img/table_left.gif" width="5" height="30" /></td>
   <td width="73">제목</td>
   <td width="379">작성자</td>
    <td width="73">작성일</td>


   <td width="7"></td>
  </tr>
  </div>
  <tbody>
					<%
						if (list1.size() < 1) {
					%>
					<tr>
						<td colspan="5"><p class="text-center text-warning"
								style="height: 100px">저장된 데이터가 없습니다.</p></td>
					</tr>
					<%
						} else {
							for (int i=0; i<list1.size(); i++) {
								NboardItem item = list1.get(i);
					%>
					<tr class="text-center">
					
						<td></td>
						<td><%=item.getTitle()%></td>
						<td><%=item.getMember_seq()%></td>
						<td><%=item.getReg_date()%></td>
						
						<td><a href="nBoardView.jsp?seq=<%=item.getSeq()%>"
							class="btn btn-sm btn-custom">내용보기</a></td>
					</tr>
					<%
							}
						}
					%>
					
				</tbody>
  

 </table>
 
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  
  
  <tr><td colspan="4" height="5"></td></tr>
  <tr align="center">
  
  </tr>
  
</table>


  
  <br />
<br />
<br />
    <br />
<br />
<br />
  



<div class="top-hidden-xs">
	<%@include file="topBottom.jsp" %>
</div>



		<script src="assets/js/jquery.js"></script>
		<script src="assets/js/bootstrap.min.js"></script>

	</body>
</html>

